@ GNU AS assembler header file for FileCore
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:47:15 2012
@ Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995

@ OSLib---efficient, type-safe, transparent, extensible,
@ register-safe API coverage of RISC OS
@ 
@ Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
@ 
@ Licence:
@ 
@    OSLib is free software; you can redistribute it and/or modify
@ it under the terms of the GNU General Public License as published by
@ the Free Software Foundation; either version 1, or (at your option)
@ any later version - and this with the following clarification and
@ special exception:
@ 
@    Linking this library statically or dynamically with other modules
@ is making a combined work based on this library. Thus, the terms
@ and conditions of the GNU General Public License cover the whole
@ combination.
@ 
@    As a special exception, the copyright holders of this library
@ give you permission to link this library with independent modules
@ to produce an executable, regardless of the license terms of these
@ independent modules, and to copy and distribute the resulting
@ executable under terms of your choice, provided that you also meet,
@ for each linked independent module, the terms and conditions of the
@ license of that module. An independent module is a module which is
@ not derived from or based on this library. If you modify this
@ library, you may extend this exception to your version of the library,
@ but you are not obliged to do so. If you do not wish to do so, delete
@ this exception statement from your version.
@ 
@    OSLib is distributed in the hope that it will be useful,
@ but WITHOUT ANY WARRANTY; without even the implied warranty of
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@ GNU General Public License for more details.
@ 
@    You should have received a copy of the GNU General Public License
@ along with this programme; if not, write to the Free Software
@ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef FileCore_Hdr
#  define FileCore_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

#  ifndef Get_FileSwitch
#    define Get_FileSwitch
#    include "oslib/FileSwitch.Hdr"
#  endif

@Symbols for constants
#  define FileCore_HardDiscsNeedFIQ 0x1
#  define FileCore_FloppiesNeedFIQ 0x2
#  define FileCore_AddressBySector 0x4
#  define FileCore_UseScratchForTemporary 0x8
#  define FileCore_HardDiscsCanMount 0x10
#  define FileCore_HardDiscsCanPollChange 0x20
#  define FileCore_FloppiesCanEject 0x40
#  define FileCore_HardDiscsCanEject 0x80
#  define FileCore_SupportsReadDriveFlags 0x100
#  define FileCore_UseSectorAddressing 0x200
#  define FileCore_ReturnsNewStyleErrors 0x400
#  define FileCore_LowSectorSequenceSides 0x40
#  define FileCore_LowSectorDoubleStep 0x80
#  define FileCore_DiscAddressOffset 0x1fffffff
#  define FileCore_DiscAddressDrive 0xe0000000
#  define FileCore_DiscAddressOffsetShift 0x0
#  define FileCore_DiscAddressDriveShift 0x1d
#  define FileCore_DiscOpGivenAlternativeDefectList 0x10
#  define FileCore_DiscOpGivenSectorList 0x20
#  define FileCore_DiscOpIgnoreEscape 0x40
#  define FileCore_DiscOpIgnoreTimeout 0x80
#  define FileCore_DiscOpAlternativeRecord 0xffffff00
#  define FileCore_DiscOpAlternativeRecordShift 0x6
#  define FileCore_CreateFloppyCount 0xff
#  define FileCore_CreateFloppyCountShift 0x0
#  define FileCore_CreateHardDiscCount 0xff00
#  define FileCore_CreateHardDiscCountShift 0x8
#  define FileCore_CreateDefaultDrive 0xff0000
#  define FileCore_CreateDefaultDriveShift 0x10
#  define FileCore_CreateNoDirState 0x40000000
#  define FileCore_FloppyOldStructure 0x80
#  define FileCore_FloppyOldMap 0x100
#  define FileCore_FormatL 0x80
#  define FileCore_FormatD 0x81
#  define FileCore_FormatE 0x82
#  define FileCore_FormatF 0x83
#  define FileCore_PollNotChanged 0x1
#  define FileCore_PollMayBeChanged 0x2
#  define FileCore_PollChanged 0x4
#  define FileCore_PollEmpty 0x8
#  define FileCore_PollReady 0x10
#  define FileCore_PollFortyTrack 0x20
#  define FileCore_PollEmptyWorks 0x40
#  define FileCore_PollChangedWorks 0x80
#  define FileCore_PollHighDensity 0x100
#  define FileCore_PollDensitySenseWorks 0x200
#  define FileCore_PollReadyWorks 0x400
#  define FileCore_FeatureNewStyleErrors 0x1

@Symbols for structure offsets and sizes
        .struct 0
FileCore_Descriptor_flags      : .skip   3*Byte
FileCore_Descriptor_fs_no      : .skip   FileSwitch_FSNo
FileCore_Descriptor_title_offset: .skip   Int
FileCore_Descriptor_boot_text_offset: .skip   Int
FileCore_Descriptor_disc_op_offset: .skip   Int
FileCore_Descriptor_misc_op_offset: .skip   Int
FileCore_Descriptor            : 

        .struct 0
FileCore_Disc_log2secsize      : .skip   Byte
FileCore_Disc_secspertrack     : .skip   Byte
FileCore_Disc_heads            : .skip   Byte
FileCore_Disc_density          : .skip   Byte
FileCore_Disc_idlen            : .skip   Byte
FileCore_Disc_log2bpmb         : .skip   Byte
FileCore_Disc_skew             : .skip   Byte
FileCore_Disc_bootoption       : .skip   Byte
FileCore_Disc_lowsector        : .skip   Byte
FileCore_Disc_nzones           : .skip   Byte
FileCore_Disc_zone_spare       : .skip   Short
FileCore_Disc_root             : .skip   Int
FileCore_Disc_disc_size        : .skip   Int
FileCore_Disc_disc_id          : .skip   Short
FileCore_Disc_disc_name        : .skip   10*Char
FileCore_Disc_disctype         : .skip   Int
FileCore_Disc_disc_size_hi     : .skip   Int
FileCore_Disc_share_size       : .skip   Byte
FileCore_Disc_big_flag         : .skip   Byte
FileCore_Disc_reserved         : .skip   22*Byte
FileCore_Disc                  : 

        .struct 0
        .skip   Bits
FileCore_DiscAddress           : 

        .struct 0
        .skip   Bits
FileCore_SectorDiscAddress     : 

        .struct 0
FileCore_DiscAddress64_drive   : .skip   Byte
FileCore_DiscAddress64_reserved: .skip   3*Byte
FileCore_DiscAddress64_offset_low: .skip   Int
FileCore_DiscAddress64_offset_high: .skip   Int
FileCore_DiscAddress64         : 

        .struct 0
FileCore_Format_sector_size    : .skip   Int
FileCore_Format_gap1_side0     : .skip   Int
FileCore_Format_gap1_side1     : .skip   Int
FileCore_Format_gap3           : .skip   Int
FileCore_Format_secspertrack   : .skip   Byte
FileCore_Format_density        : .skip   Byte
FileCore_Format_options        : .skip   Byte
FileCore_Format_lowsector      : .skip   Byte
FileCore_Format_interleave     : .skip   Byte
FileCore_Format_side_skew      : .skip   Byte
FileCore_Format_track_skew     : .skip   Byte
FileCore_Format_sector_fill    : .skip   Byte
FileCore_Format_track_count    : .skip   Int
FileCore_Format_reserved       : .skip   36*Byte
FileCore_Format                : 

        .struct 0
FileCore_TrackFormat_sector_size: .skip   Int
FileCore_TrackFormat_gap1_side0: .skip   Int
FileCore_TrackFormat_gap1_side1: .skip   Int
FileCore_TrackFormat_gap3      : .skip   Int
FileCore_TrackFormat_secspertrack: .skip   Byte
FileCore_TrackFormat_density   : .skip   Byte
FileCore_TrackFormat_options   : .skip   Byte
FileCore_TrackFormat_sector_fill: .skip   Byte
FileCore_TrackFormat_track_count: .skip   Int
FileCore_TrackFormat_reserved  : .skip   12*Byte
FileCore_TrackFormat_sectors   : .skip   Bits
FileCore_TrackFormat           : 
        
        .altmacro
        .macro  FileCore_TrackFormat_MEMBERS label
\label&_sector_size            : .skip   Int
\label&_gap1_side0             : .skip   Int
\label&_gap1_side1             : .skip   Int
\label&_gap3                   : .skip   Int
\label&_secspertrack           : .skip   Byte
\label&_density                : .skip   Byte
\label&_options                : .skip   Byte
\label&_sector_fill            : .skip   Byte
\label&_track_count            : .skip   Int
\label&_reserved               : .skip   12*Byte
        .endm
        
        .struct 0
        FileCore_TrackFormat_MEMBERS FileCore_TrackFormatBase
FileCore_TrackFormatBase       : 

        .struct 0
FileCore_DefectList_defect     : .skip   Int
FileCore_DefectList            : 

        .struct 0
FileCore_Info_flags            : .skip   3*Byte
FileCore_Info_fs_no            : .skip   FileSwitch_FSNo
FileCore_Info_title            : .skip   Ptr
FileCore_Info_boot_text        : .skip   Ptr
FileCore_Info_disc_op          : .skip   Ptr
FileCore_Info_misc_op          : .skip   Ptr
FileCore_Info                  : 

        .struct 0
        .skip   Bits
FileCore_FeatureFlags          : 


@Symbols for SWI's and SWI reason codes
.set XFileCore_DiscOp,0x60540
.set FileCore_DiscOp,0x40540

#  define FileCoreDiscOp_Verify 0x0
   @Entry
   @  R1 = &0 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_DiscAddress)
   @  R4 = unverified (Int)

#  define FileCoreDiscOp_ReadSectors 0x1
   @Entry
   @  R1 = &1 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 = data (pointer to data)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_DiscAddress)
   @  R3 = next_data (pointer to data)
   @  R4 = unread (Int)

#  define FileCoreDiscOp_WriteSectors 0x2
   @Entry
   @  R1 = &2 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 -> data (data)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_DiscAddress)
   @  R3 -> next_data (data)
   @  R4 = unwritten (Int)

#  define FileCoreDiscOp_ReadTrack 0x3
   @Entry
   @  R1 = &3 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 = data (pointer to data)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_ReadId 0x3
   @Entry
   @  R1 = &3 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 = data (pointer to data)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_WriteTrack 0x4
   @Entry
   @  R1 = &4 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 -> data (data)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_FormatTrack 0x4
   @Entry
   @  R1 = &4 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 = &0
   @  R4 -> track_format (FileCore_TrackFormat)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_Seek 0x5
   @Entry
   @  R1 = &5 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_Restore 0x6
   @Entry
   @  R1 = &6 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_StepIn 0x7
   @Entry
   @  R1 = &7 :OR: flags (Bits)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_StepOut 0x8
   @Entry
   @  R1 = &8 :OR: flags (Bits)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp_ReadSectorsViaCache 0x9
   @Entry
   @  R1 = &9 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 = data (pointer to data)
   @  R4 = size (Int)
   @  R6 = cache_handle (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_DiscAddress)
   @  R3 = next_data (pointer to data)
   @  R4 = unread (Int)
   @  R6 = cache_handle_out (Int)

#  define FileCoreDiscOp_Specify 0xf
   @Entry
   @  R1 = &F :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R8 = instance (pointer to Void)

.set XFileCore_Create,0x60541
.set FileCore_Create,0x40541
   @Entry
   @  R0 -> descriptor (FileCore_Descriptor)
   @  R1 -> module_base (data)
   @  R2 = word (pointer to data)
   @  R3 = options (Bits)
   @  R4 = dir_cache_size (Int)
   @  R5 = file_cache_buffer_count (Int)
   @  R6 = map_sizes (Bits)
   @Exit
   @  R0 = instance (pointer to Void)
   @  R1 = floppy_done (pointer to code)
   @  R2 = hard_disc_done (pointer to code)
   @  R3 = release_fiq (pointer to code)

.set XFileCore_Drives,0x60542
.set FileCore_Drives,0x40542
   @Entry
   @  R8 = instance (pointer to Void)
   @Exit
   @  R0 = default_drive (Int)
   @  R1 = floppy_count (Int)
   @  R2 = hard_disc_count (Int)

.set XFileCore_FreeSpace,0x60543
.set FileCore_FreeSpace,0x40543
   @Entry
   @  R0 -> disc_name (String)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R0 = free (Int)
   @  R1 = max (Int)

.set XFileCore_FloppyStructure,0x60544
.set FileCore_FloppyStructure,0x40544
   @Entry
   @  R0 = buffer (pointer to data)
   @  R1 -> disc (FileCore_Disc)
   @  R2 = flags (Bits)
   @  R3 -> defect_list (FileCore_DefectList)
   @Exit
   @  R3 = used (Int)

.set XFileCore_DescribeDisc,0x60545
.set FileCore_DescribeDisc,0x40545
   @Entry
   @  R0 -> disc_name (String)
   @  R1 = disc (pointer to FileCore_Disc)
   @  R8 = instance (pointer to Void)

.set XFileCore_DiscardReadSectorsCache,0x60546
.set FileCore_DiscardReadSectorsCache,0x40546
   @Entry
   @  R6 = cache_handle (Int)

.set XFileCore_DiscFormat,0x60547
.set FileCore_DiscFormat,0x40547
   @Entry
   @  R0 = buffer (pointer to FileCore_Format)
   @  R1 = vet_format_swi (Int)
   @  R2 = vet_format_handle (Int)
   @  R3 = format (Int)

.set XFileCore_LayoutStructure,0x60548
.set FileCore_LayoutStructure,0x40548
   @Entry
   @  R0 -> disc (FileCore_Disc)
   @  R1 -> defect_list (FileCore_DefectList)
   @  R2 -> disc_name (String)
   @  R3 = image_file (OS_F)

.set XFileCore_LayoutStructureW,0x60548
.set FileCore_LayoutStructureW,0x40548
   @Entry
   @  R0 -> disc (FileCore_Disc)
   @  R1 -> defect_list (FileCore_DefectList)
   @  R2 -> disc_name (String)
   @  R3 = image_file (OS_FW)

.set XFileCore_MiscOp,0x60549
.set FileCore_MiscOp,0x40549

#  define FileCoreMiscOp_Mount 0x0
   @Entry
   @  R0 = &0
   @  R1 = drive_no (Int)
   @  R2 = disc_addr (FileCore_DiscAddress)
   @  R3 = buffer (pointer to data)
   @  R4 = size (Int)
   @  R5 = disc (pointer to FileCore_Disc)
   @  R8 = instance (pointer to Void)

#  define FileCoreMiscOp_PollChanged 0x1
   @Entry
   @  R0 = &1
   @  R1 = drive_no (Int)
   @  R2 = sequence_no (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = sequence_no_out (Int)
   @  R3 = result (Bits)

#  define FileCoreMiscOp_LockDrive 0x2
   @Entry
   @  R0 = &2
   @  R1 = drive_no (Int)
   @  R8 = instance (pointer to Void)

#  define FileCoreMiscOp_UnlockDrive 0x3
   @Entry
   @  R0 = &3
   @  R1 = drive_no (Int)
   @  R8 = instance (pointer to Void)

#  define FileCoreMiscOp_PollPeriod 0x4
   @Entry
   @  R0 = &4
   @  R1 -> disc_name (String)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R5 = poll_period (Int)
   @  R6 -> media_type (String)

#  define FileCoreMiscOp_EjectDisc 0x5
   @Entry
   @  R0 = &5
   @  R1 = drive_no (Int)
   @  R8 = instance (pointer to Void)

#  define FileCoreMiscOp_ReadInfo 0x6
   @Entry
   @  R0 = &6
   @  R8 = instance (pointer to Void)
   @Exit
   @  R0 -> info (FileCore_Info)

#  define FileCoreMiscOp_DriveStatus 0x7
   @Entry
   @  R0 = &7
   @  R1 = drive_no (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = locked (Bool)

.set XFileCore_SectorOp,0x6054a
.set FileCore_SectorOp,0x4054a

#  define FileCoreSectorOp_Verify 0x0
   @Entry
   @  R1 = &0 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_SectorDiscAddress)
   @  R4 = unverified (Int)

#  define FileCoreSectorOp_ReadSectors 0x1
   @Entry
   @  R1 = &1 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R3 = data (pointer to data)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_SectorDiscAddress)
   @  R3 = next_data (pointer to data)
   @  R4 = unread (Int)

#  define FileCoreSectorOp_WriteSectors 0x2
   @Entry
   @  R1 = &2 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R3 -> data (data)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_SectorDiscAddress)
   @  R3 -> next_data (data)
   @  R4 = unwritten (Int)

#  define FileCoreSectorOp_ReadTrack 0x3
   @Entry
   @  R1 = &3 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R3 = data (pointer to data)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_ReadId 0x3
   @Entry
   @  R1 = &3 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R3 = data (pointer to data)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_WriteTrack 0x4
   @Entry
   @  R1 = &4 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R3 -> data (data)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_FormatTrack 0x4
   @Entry
   @  R1 = &4 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R3 = &0
   @  R4 -> track_format (FileCore_TrackFormat)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_Seek 0x5
   @Entry
   @  R1 = &5 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_Restore 0x6
   @Entry
   @  R1 = &6 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_StepIn 0x7
   @Entry
   @  R1 = &7 :OR: flags (Bits)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_StepOut 0x8
   @Entry
   @  R1 = &8 :OR: flags (Bits)
   @  R8 = instance (pointer to Void)

#  define FileCoreSectorOp_ReadSectorsViaCache 0x9
   @Entry
   @  R1 = &9 :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R3 = data (pointer to data)
   @  R4 = size (Int)
   @  R6 = cache_handle (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (FileCore_SectorDiscAddress)
   @  R3 = next_data (pointer to data)
   @  R4 = unread (Int)
   @  R6 = cache_handle_out (Int)

#  define FileCoreSectorOp_Specify 0xf
   @Entry
   @  R1 = &F :OR: flags (Bits)
   @  R2 = disc_addr (FileCore_SectorDiscAddress)
   @  R8 = instance (pointer to Void)

.set XFileCore_FreeSpace64,0x6054b
.set FileCore_FreeSpace64,0x4054b
   @Entry
   @  R0 -> disc_name (String)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R0 = free_lo (Bits)
   @  R1 = free_hi (Int)
   @  R2 = max (Int)

.set XFileCore_DiscOp64,0x6054c
.set FileCore_DiscOp64,0x4054c

#  define FileCoreDiscOp64_Verify 0x0
   @Entry
   @  R1 = &0 :OR: flags (Bits)
   @  R2 = disc_addr (pointer to FileCore_DiscAddress64)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (pointer to FileCore_DiscAddress64)
   @  R4 = unverified (Int)

#  define FileCoreDiscOp64_ReadSectors 0x1
   @Entry
   @  R1 = &1 :OR: flags (Bits)
   @  R2 = disc_addr (pointer to FileCore_DiscAddress64)
   @  R3 = data (pointer to data)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (pointer to FileCore_DiscAddress64)
   @  R3 = next_data (pointer to data)
   @  R4 = unread (Int)

#  define FileCoreDiscOp64_WriteSectors 0x2
   @Entry
   @  R1 = &2 :OR: flags (Bits)
   @  R2 = disc_addr (pointer to FileCore_DiscAddress64)
   @  R3 -> data (data)
   @  R4 = size (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (pointer to FileCore_DiscAddress64)
   @  R3 -> next_data (data)
   @  R4 = unwritten (Int)

#  define FileCoreDiscOp64_ReadTrack 0x3
   @Entry
   @  R1 = &3 :OR: flags (Bits)
   @  R2 -> disc_addr (FileCore_DiscAddress64)
   @  R3 = data (pointer to data)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_ReadId 0x3
   @Entry
   @  R1 = &3 :OR: flags (Bits)
   @  R2 -> disc_addr (FileCore_DiscAddress64)
   @  R3 = data (pointer to data)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_WriteTrack 0x4
   @Entry
   @  R1 = &4 :OR: flags (Bits)
   @  R2 -> disc_addr (FileCore_DiscAddress64)
   @  R3 -> data (data)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_FormatTrack 0x4
   @Entry
   @  R1 = &4 :OR: flags (Bits)
   @  R2 -> disc_addr (FileCore_DiscAddress64)
   @  R3 = &0
   @  R4 -> track_format (FileCore_TrackFormat)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_Seek 0x5
   @Entry
   @  R1 = &5 :OR: flags (Bits)
   @  R2 -> disc_addr (FileCore_DiscAddress64)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_Restore 0x6
   @Entry
   @  R1 = &6 :OR: flags (Bits)
   @  R2 -> disc_addr (FileCore_DiscAddress64)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_StepIn 0x7
   @Entry
   @  R1 = &7 :OR: flags (Bits)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_StepOut 0x8
   @Entry
   @  R1 = &8 :OR: flags (Bits)
   @  R8 = instance (pointer to Void)

#  define FileCoreDiscOp64_ReadSectorsViaCache 0x9
   @Entry
   @  R1 = &9 :OR: flags (Bits)
   @  R2 = disc_addr (pointer to FileCore_DiscAddress64)
   @  R3 = data (pointer to data)
   @  R4 = size (Int)
   @  R6 = cache_handle (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R2 = next_disc_addr (pointer to FileCore_DiscAddress64)
   @  R3 = next_data (pointer to data)
   @  R4 = unread (Int)
   @  R6 = cache_handle_out (Int)

#  define FileCoreDiscOp64_Specify 0xf
   @Entry
   @  R1 = &F :OR: flags (Bits)
   @  R2 -> disc_addr (FileCore_DiscAddress64)
   @  R8 = instance (pointer to Void)

.set XFileCore_Features,0x6054d
.set FileCore_Features,0x4054d
   @Exit
   @  R0 = features (FileCore_FeatureFlags)

#  define Service_IdentifyDisc 0x69
   @Entry
   @  R1 = &69
   @  R2 = format_name (pointer to String)
   @  R3 = size (Int)
   @  R5 -> disc (FileCore_Disc)
   @  R6 = cache_handle (Int)
   @  R8 = instance (pointer to Void)
   @Exit
   @  R1 = unclaimed (Bool)
   @  R2 = file_type (Bits)
   @  R6 = cache_handle_out (Int)

#endif
